



if __name__ == '__main__':
    cart = [("Apple",2),("Banana",3),("Orange",4),("Pear",1)]
    cart_items = []
    expensive_items = []
    cart_doubled = []
    for i in cart:
        cart_items.append(i[0])
    print(cart_items)

    for i in cart:
        if int(i[1]) >= 3:
            expensive_items.append(i[0])
    print(expensive_items)

    for i in cart:
        tuple_j = (i[0],i[1] * 2)
        # print(tuple_j)
        cart_doubled.append(tuple_j)
    print(cart_doubled)

